<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ page import="com.hhwy.sso.client.filter.SessionUtil" %>
<%@taglib prefix="shiro"  uri="/WEB-INF/ac.tld"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <script src="${Config.staticURL}plugins/miniui/boot.js" type="text/javascript"></script>
    <script type="text/javascript"src="${Config.staticURL}/lib/jquery/jquery.min.js"></script>
    <link rel="stylesheet" href="${Config.staticURL}plugins/miniui/table.css">
    <script src="${Config.basePath}plugins/miniui/fileupload/js/ajaxfileupload.js" type="text/javascript"></script>
    <title> 工程表-新增</title>
</head>

<body class="body">
<form action="" id="form1">

    <table border="0" align="center" cellpadding="0" cellspacing="0" class="tab_form">
        <TBODY>
	        <tr>
	            <td class="title" colspan="4">
	             工程表-新增	             
	            </td>
	        </tr>
 			<tr>
			
				<td class="l">
		            	父id
		        </td>
				<td class="r">
				          <input id="parentId" name="parentId" class="mini-textbox"
		                indentSpace="true" 
		                onvalidation="onValidation" 
		                selectOnFocus="true"
		                allowInput="true" 
		                required="true" 
		                errorMode="border" 
	                />
	         	              	<span style="color: red;">*</span>
	            </td>
				<td class="l">
		            	工程名称
		        </td>
				<td class="r">
	        			
	          <input id="projectName" name="projectName" class="mini-textbox"
		                indentSpace="true" 
		                onvalidation="onValidation" 
		                selectOnFocus="true"
		                allowInput="true" 
		                required="true" 
		                errorMode="border" 
	                />
	          	              	<span style="color: red;">*</span>
	            </td>
	    	</tr>
	    	
	    	
 			<tr>
			
				<td class="l">
		            	线路工程名称
		        </td>
				<td class="r">
				          <input id="lineProjectName" name="lineProjectName" class="mini-textbox"
		                indentSpace="true" 
		                onvalidation="onValidation" 
		                selectOnFocus="true"
		                allowInput="true" 
		                required="true" 
		                errorMode="border" 
	                />
	         	              	<span style="color: red;">*</span>
	            </td>
				<td class="l">
		            	工程简称
		        </td>
				<td class="r">
	        			
	          <input id="projectShortName" name="projectShortName" class="mini-textbox"
		                indentSpace="true" 
		                onvalidation="onValidation" 
		                selectOnFocus="true"
		                allowInput="true" 
		                required="true" 
		                errorMode="border" 
	                />
	          	              	<span style="color: red;">*</span>
	            </td>
	    	</tr>
	    	
	    	
 			<tr>
			
				<td class="l">
		            	工程编码
		        </td>
				<td class="r">
				          <input id="projectCode" name="projectCode" class="mini-textbox"
		                indentSpace="true" 
		                onvalidation="onValidation" 
		                selectOnFocus="true"
		                allowInput="true" 
		                required="true" 
		                errorMode="border" 
	                />
	         	              	<span style="color: red;">*</span>
	            </td>
				<td class="l">
		            	总承包工程群名称
		        </td>
				<td class="r">
	        			
	          <input id="zcbProjectName" name="zcbProjectName" class="mini-textbox"
		                indentSpace="true" 
		                onvalidation="onValidation" 
		                selectOnFocus="true"
		                allowInput="true" 
		                required="true" 
		                errorMode="border" 
	                />
	          	              	<span style="color: red;">*</span>
	            </td>
	    	</tr>
	    	
	    	
 			<tr>
			
				<td class="l">
		            	工程性质
		        </td>
				<td class="r">
				          <input id="projectStyle" name="projectStyle" class="mini-textbox"
		                indentSpace="true" 
		                onvalidation="onValidation" 
		                selectOnFocus="true"
		                allowInput="true" 
		                required="true" 
		                errorMode="border" 
	                />
	         	              	<span style="color: red;">*</span>
	            </td>
				<td class="l">
		            	工程类型
		        </td>
				<td class="r">
	        			
	          <input id="projectType" name="projectType" class="mini-textbox"
		                indentSpace="true" 
		                onvalidation="onValidation" 
		                selectOnFocus="true"
		                allowInput="true" 
		                required="true" 
		                errorMode="border" 
	                />
	          	              	<span style="color: red;">*</span>
	            </td>
	    	</tr>
	    	
	    	
 			<tr>
			
				<td class="l">
		            	电压等级
		        </td>
				<td class="r">
				          <input id="vGrade" name="vGrade" class="mini-textbox"
		                indentSpace="true" 
		                onvalidation="onValidation" 
		                selectOnFocus="true"
		                allowInput="true" 
		                required="true" 
		                errorMode="border" 
	                />
	         	              	<span style="color: red;">*</span>
	            </td>
				<td class="l">
		            	建设性质
		        </td>
				<td class="r">
	        			
	          <input id="buileStyle" name="buileStyle" class="mini-textbox"
		                indentSpace="true" 
		                onvalidation="onValidation" 
		                selectOnFocus="true"
		                allowInput="true" 
		                required="true" 
		                errorMode="border" 
	                />
	          	              	<span style="color: red;">*</span>
	            </td>
	    	</tr>
	    	
	    	
 			<tr>
			
				<td class="l">
		            	变电容量
		        </td>
				<td class="r">
				          <input id="tranCount" name="tranCount" class="mini-textbox"
		                indentSpace="true" 
		                onvalidation="onValidation" 
		                selectOnFocus="true"
		                allowInput="true" 
		                required="true" 
		                errorMode="border" 
	                />
	         	              	<span style="color: red;">*</span>
	            </td>
				<td class="l">
		            	线路起点
		        </td>
				<td class="r">
	        			
	          <input id="lineStart" name="lineStart" class="mini-textbox"
		                indentSpace="true" 
		                onvalidation="onValidation" 
		                selectOnFocus="true"
		                allowInput="true" 
		                required="true" 
		                errorMode="border" 
	                />
	          	              	<span style="color: red;">*</span>
	            </td>
	    	</tr>
	    	
	    	
 			<tr>
			
				<td class="l">
		            	线路终点
		        </td>
				<td class="r">
				          <input id="lineEnd" name="lineEnd" class="mini-textbox"
		                indentSpace="true" 
		                onvalidation="onValidation" 
		                selectOnFocus="true"
		                allowInput="true" 
		                required="true" 
		                errorMode="border" 
	                />
	         	              	<span style="color: red;">*</span>
	            </td>
				<td class="l">
		            	线路条数
		        </td>
				<td class="r">
	        			
	          <input id="lineCount" name="lineCount" class="mini-textbox"
		                indentSpace="true" 
		                onvalidation="onValidation" 
		                selectOnFocus="true"
		                allowInput="true" 
		                required="true" 
		                errorMode="border" 
	                />
	          	              	<span style="color: red;">*</span>
	            </td>
	    	</tr>
	    	
	    	
 			<tr>
			
				<td class="l">
		            	主配变台数
		        </td>
				<td class="r">
				          <input id="mainOtherCount" name="mainOtherCount" class="mini-textbox"
		                indentSpace="true" 
		                onvalidation="onValidation" 
		                selectOnFocus="true"
		                allowInput="true" 
		                required="true" 
		                errorMode="border" 
	                />
	         	              	<span style="color: red;">*</span>
	            </td>
				<td class="l">
		            	总投资额
		        </td>
				<td class="r">
	        			
	          <input id="totleMoney" name="totleMoney" class="mini-textbox"
		                indentSpace="true" 
		                onvalidation="onValidation" 
		                selectOnFocus="true"
		                allowInput="true" 
		                required="true" 
		                errorMode="border" 
	                />
	          	              	<span style="color: red;">*</span>
	            </td>
	    	</tr>
	    	
	    	
 			<tr>
			
				<td class="l">
		            	变电投资额
		        </td>
				<td class="r">
				          <input id="tranMoney" name="tranMoney" class="mini-textbox"
		                indentSpace="true" 
		                onvalidation="onValidation" 
		                selectOnFocus="true"
		                allowInput="true" 
		                required="true" 
		                errorMode="border" 
	                />
	         	              	<span style="color: red;">*</span>
	            </td>
				<td class="l">
		            	线路投资额
		        </td>
				<td class="r">
	        			
	          <input id="lineMoney" name="lineMoney" class="mini-textbox"
		                indentSpace="true" 
		                onvalidation="onValidation" 
		                selectOnFocus="true"
		                allowInput="true" 
		                required="true" 
		                errorMode="border" 
	                />
	          	              	<span style="color: red;">*</span>
	            </td>
	    	</tr>
	    	
	    	
 			<tr>
			
				<td class="l">
		            	工程状态
		        </td>
				<td class="r">
				          <input id="projectState" name="projectState" class="mini-textbox"
		                indentSpace="true" 
		                onvalidation="onValidation" 
		                selectOnFocus="true"
		                allowInput="true" 
		                required="true" 
		                errorMode="border" 
	                />
	         	              	<span style="color: red;">*</span>
	            </td>
				<td class="l">
		            	是否大跨越工程
		        </td>
				<td class="r">
	        			
	          <input id="isBigCrossProject" name="isBigCrossProject" class="mini-textbox"
		                indentSpace="true" 
		                onvalidation="onValidation" 
		                selectOnFocus="true"
		                allowInput="true" 
		                required="true" 
		                errorMode="border" 
	                />
	          	              	<span style="color: red;">*</span>
	            </td>
	    	</tr>
	    	
	    	
 			<tr>
			
				<td class="l">
		            	是否创优工程
		        </td>
				<td class="r">
				          <input id="isPerfectProject" name="isPerfectProject" class="mini-textbox"
		                indentSpace="true" 
		                onvalidation="onValidation" 
		                selectOnFocus="true"
		                allowInput="true" 
		                required="true" 
		                errorMode="border" 
	                />
	         	              	<span style="color: red;">*</span>
	            </td>
				<td class="l">
		            	是否重点工程
		        </td>
				<td class="r">
	        			
	          <input id="isImportProject" name="isImportProject" class="mini-textbox"
		                indentSpace="true" 
		                onvalidation="onValidation" 
		                selectOnFocus="true"
		                allowInput="true" 
		                required="true" 
		                errorMode="border" 
	                />
	          	              	<span style="color: red;">*</span>
	            </td>
	    	</tr>
	    	
	    	
 			<tr>
			
				<td class="l">
		            	计划开工日期
		        </td>
				<td class="r">
							<input id="planStartTime" name="planStartTime" class="mini-datepicker mini-textbox"
					
					 allowInput="false"
				     format="yyyy-MM-dd" 
				     indentSpace="true" 
			         onvalidation="onValidation" 
			         selectOnFocus="true"
			         required="false" 
			         errorMode="border" 
	                 showTime="false"/>
			
				              	<span style="color: red;">*</span>
	            </td>
				<td class="l">
		            	计划竣工日期
		        </td>
				<td class="r">
	        			<input id="planFininshTime" name="planFininshTime" class="mini-datepicker mini-textbox"
					
					 allowInput="false"
				     format="yyyy-MM-dd" 
				     indentSpace="true" 
			         onvalidation="onValidation" 
			         selectOnFocus="true"
			         required="false" 
			         errorMode="border" 
	                 showTime="false"/>
			
				              	<span style="color: red;">*</span>
	            </td>
	    	</tr>
	    	
	    	
 			<tr>
			
				<td class="l">
		            	计划投产日期
		        </td>
				<td class="r">
							<input id="panUsedTime" name="panUsedTime" class="mini-datepicker mini-textbox"
					
					 allowInput="false"
				     format="yyyy-MM-dd" 
				     indentSpace="true" 
			         onvalidation="onValidation" 
			         selectOnFocus="true"
			         required="false" 
			         errorMode="border" 
	                 showTime="false"/>
			
				              	<span style="color: red;">*</span>
	            </td>
				<td class="l">
		            	建设地点
		        </td>
				<td class="r">
	        			
	          <input id="buildPoint" name="buildPoint" class="mini-textbox"
		                indentSpace="true" 
		                onvalidation="onValidation" 
		                selectOnFocus="true"
		                allowInput="true" 
		                required="true" 
		                errorMode="border" 
	                />
	          	              	<span style="color: red;">*</span>
	            </td>
	    	</tr>
	    	
	    	
 			<tr>
			
				<td class="l">
		            	建设地址
		        </td>
				<td class="r">
				          <input id="buildAddr" name="buildAddr" class="mini-textbox"
		                indentSpace="true" 
		                onvalidation="onValidation" 
		                selectOnFocus="true"
		                allowInput="true" 
		                required="true" 
		                errorMode="border" 
	                />
	         	              	<span style="color: red;">*</span>
	            </td>
				<td class="l">
		            	总承包业主单位
		        </td>
				<td class="r">
	        			
	          <input id="managerOrg" name="managerOrg" class="mini-textbox"
		                indentSpace="true" 
		                onvalidation="onValidation" 
		                selectOnFocus="true"
		                allowInput="true" 
		                required="true" 
		                errorMode="border" 
	                />
	          	              	<span style="color: red;">*</span>
	            </td>
	    	</tr>
	    	
	    	
 			<tr>
			
				<td class="l">
		            	业主项目经理
		        </td>
				<td class="r">
				          <input id="manager" name="manager" class="mini-textbox"
		                indentSpace="true" 
		                onvalidation="onValidation" 
		                selectOnFocus="true"
		                allowInput="true" 
		                required="true" 
		                errorMode="border" 
	                />
	         	              	<span style="color: red;">*</span>
	            </td>
				<td class="l">
		            	业主联系电话
		        </td>
				<td class="r">
	        			
	          <input id="tel" name="tel" class="mini-textbox"
		                indentSpace="true" 
		                onvalidation="onValidation" 
		                selectOnFocus="true"
		                allowInput="true" 
		                required="true" 
		                errorMode="border" 
	                />
	          	              	<span style="color: red;">*</span>
	            </td>
	    	</tr>
	    	
	    	
 			<tr>
			
				<td class="l">
		            	工程附件资料
		        </td>
				<td class="r">
				          <input id="groupId" name="groupId" class="mini-textbox"
		                indentSpace="true" 
		                onvalidation="onValidation" 
		                selectOnFocus="true"
		                allowInput="true" 
		                required="true" 
		                errorMode="border" 
	                />
	         	              	<span style="color: red;">*</span>
	            </td>
				<td class="l">
		            	业主单位
		        </td>
				<td class="r">
	        			
	          <input id="yzOrg" name="yzOrg" class="mini-textbox"
		                indentSpace="true" 
		                onvalidation="onValidation" 
		                selectOnFocus="true"
		                allowInput="true" 
		                required="true" 
		                errorMode="border" 
	                />
	          	              	<span style="color: red;">*</span>
	            </td>
	    	</tr>
	    	
	    	
 			<tr>
			
				<td class="l">
		            	监理单位
		        </td>
				<td class="r">
				          <input id="jlOrg" name="jlOrg" class="mini-textbox"
		                indentSpace="true" 
		                onvalidation="onValidation" 
		                selectOnFocus="true"
		                allowInput="true" 
		                required="true" 
		                errorMode="border" 
	                />
	         	              	<span style="color: red;">*</span>
	            </td>
				<td class="l">
		            	施工单位
		        </td>
				<td class="r">
	        			
	          <input id="sgOrg" name="sgOrg" class="mini-textbox"
		                indentSpace="true" 
		                onvalidation="onValidation" 
		                selectOnFocus="true"
		                allowInput="true" 
		                required="true" 
		                errorMode="border" 
	                />
	          	              	<span style="color: red;">*</span>
	            </td>
	    	</tr>
	    	
	    	
 			<tr>
			
				<td class="l">
		            	工程概况
		        </td>
				<td class="r">
				          <input id="projectIntrduce" name="projectIntrduce" class="mini-textbox"
		                indentSpace="true" 
		                onvalidation="onValidation" 
		                selectOnFocus="true"
		                allowInput="true" 
		                required="true" 
		                errorMode="border" 
	                />
	         	              	<span style="color: red;">*</span>
	            </td>
				<td class="l">
		            	录入人
		        </td>
				<td class="r">
	        			
	          <input id="tradePerson" name="tradePerson" class="mini-textbox"
		                indentSpace="true" 
		                onvalidation="onValidation" 
		                selectOnFocus="true"
		                allowInput="true" 
		                required="true" 
		                errorMode="border" 
	                />
	          	              	<span style="color: red;">*</span>
	            </td>
	    	</tr>
	    	
	    	
 			<tr>
			
				<td class="l">
		            	录入时间
		        </td>
				<td class="r">
							<input id="tradeTime" name="tradeTime" class="mini-datepicker mini-textbox"
					
					 allowInput="false"
				     format="yyyy-MM-dd" 
				     indentSpace="true" 
			         onvalidation="onValidation" 
			         selectOnFocus="true"
			         required="false" 
			         errorMode="border" 
	                 showTime="false"/>
			
				              	<span style="color: red;">*</span>
	            </td>
				<td class="l">
		            	删除标记位,0未删除，1已删除
		        </td>
				<td class="r">
	        			
	          <input id="deleteFlag" name="deleteFlag" class="mini-textbox"
		                indentSpace="true" 
		                onvalidation="onValidation" 
		                selectOnFocus="true"
		                allowInput="true" 
		                required="true" 
		                errorMode="border" 
	                />
	          	              	<span style="color: red;">*</span>
	            </td>
	    	</tr>
	    	
	    	
 			<tr>
			
				<td class="l">
		            	备注
		        </td>
				<td class="r">
				          <input id="remark" name="remark" class="mini-textbox"
		                indentSpace="true" 
		                onvalidation="onValidation" 
		                selectOnFocus="true"
		                allowInput="true" 
		                required="true" 
		                errorMode="border" 
	                />
	         	              	<span style="color: red;">*</span>
	            </td>
				<td class="l">
		            	线路长度
		        </td>
				<td class="r">
	        			
	          <input id="lineLength" name="lineLength" class="mini-textbox"
		                indentSpace="true" 
		                onvalidation="onValidation" 
		                selectOnFocus="true"
		                allowInput="true" 
		                required="true" 
		                errorMode="border" 
	                />
	          	              	<span style="color: red;">*</span>
	            </td>
	    	</tr>
	    	
	    	
 			<tr>
			
				<td class="l">
		            	设计单位
		        </td>
				<td class="r">
				          <input id="sjOrg" name="sjOrg" class="mini-textbox"
		                indentSpace="true" 
		                onvalidation="onValidation" 
		                selectOnFocus="true"
		                allowInput="true" 
		                required="true" 
		                errorMode="border" 
	                />
	         	              	<span style="color: red;">*</span>
	            </td>
				<td class="l">
		            	0：总承包工程，1：分工程
		        </td>
				<td class="r">
	        			
	          <input id="isProject" name="isProject" class="mini-textbox"
		                indentSpace="true" 
		                onvalidation="onValidation" 
		                selectOnFocus="true"
		                allowInput="true" 
		                required="true" 
		                errorMode="border" 
	                />
	          	              	<span style="color: red;">*</span>
	            </td>
	    	</tr>
	    	
	    	

        </TBODY>
    </table>

    <div style="text-align:center;padding-top:8px;padding-bottom:8px;" borderStyle="border:0;">
        <a class="mini-button" style="width:60px;" onclick="submitForm()">确定</a>
        <span style="display:inline-block;width:25px;"></span>
        <a class="mini-button" style="width:60px;" onclick="goback()">取消</a>
    </div>
</form>

<script type="text/javascript">
	var basePath = '${Config.baseURL}';
    mini.parse();
    
     function updateError(e) {
            var id = e.sender.name + "_error";
            var el = document.getElementById(id);
            if (el) {
                el.innerHTML = e.errorText;
            }
        }
     function onValidation(e) {                  
            updateError(e);
     }
     
     function submitForm() {


        //提交表单数据
        var form = new mini.Form("#form1");
        //表單非空验证
        form.validate();
        if (form.isValid() == false) return;

        var data = form.getData(true, true);      //获取表单多个控件的数据
        var json = mini.encode(data);   //序列化成JSON
        $.ajax({
            url: "${Config.basePath}demo/saveDemo",
            type: "POST",
            contentType: "application/json;charset=UTF-8",
            dataType: "json", //表示返回值类型，不必须
            data: json,
            async:false,
            success: function (text) {
               
            },
            error: function (XMLHttpRequest, textStatus, errorThrown) {
               
            },
            complete: function (XMLHttpRequest, textStatus) {
               
            }
        });

    }
    
    //返回列表页面
    
    function goback() {
        window.location.href = "${Config.basePath}/view/epc/demo/demoList";
    }
</script>
</body>
</html>